package com.fcgzs.search.controller;

import com.fcgzs.entity.Result;
import com.fcgzs.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @Auther: ljj
 * @Description:
 */
@RestController
@RequestMapping("/search")
public class SearchController {

    @Autowired
    private SearchService searchService;

    @GetMapping("/importSku")
    public Result importSku(){
        searchService.importSku();
        return new Result();
    }

    @PostMapping("/search")
    public Map search(@RequestBody Map searchMap){
        return searchService.search(searchMap);
    }
}
